package ch07.test.cn.cvs.dao;

import ch07.test.cn.cvs.entity.Supplier;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.List;

public class SupplierMapperImpl implements SupplierMapper{
    private SqlSessionTemplate sqlSession;
    @Override
    public List<Supplier> selectShow(Supplier supplier) {
        return sqlSession.selectList("ch07.test.cn.cvs.dao.SupplierMapper.selectShow", supplier);
    }

    @Override
    public int add(Supplier supplier) {
        int m=0;
//        if (supplier!=null){
//            m=1;
//        }
        return m;
    }

    @Override
    public int del(int id) {
        return 0;
    }

    @Override
    public int update(Supplier supplier,int id ) {
        return 0;
    }


    public SqlSessionTemplate getSqlSession() {
        return sqlSession;
    }

    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }
}
